import { Component } from "react";
class DemoOne extends Component{
    constructor(){
        super()
        this.state = {
            nume : 2
        }
    }
    add = ()=>{
        this.setState({
            nume:this.state.nume + 10
        })
    }
    render(){
        return (<>
                count累加:{this.state.nume}
                <button onClick={()=>this.add()}>点击count</button>
        </>)
    }
}
export default DemoOne